package com.mxpio.erp.common.equipment.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpio.erp.common.equipment.entity.EquipmentMaterial;
import com.mxpio.erp.common.equipment.entity.EquipmentMerchants;
import com.mxpio.erp.common.equipment.entity.EquipmentStock;
import com.mxpio.erp.common.equipment.entity.EquipmentStockLocation;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.Dept;
import com.mxpioframework.security.entity.User;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * @author H2017877
 */
@Data
public class VEquipmentStockInventory implements Serializable {
    private static final long serialVersionUID = 1L;


    /**id*/
    private String id;
    /** 批次*/
    private String batch;
    /**创建人*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    private String createBy;
    /**创建日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**当前期段期初库存数量*/
    private BigDecimal currentInitInvQty;
    /**当前台账数量*/
    private BigDecimal currentOnhandQty;
    /**当前期段累计入库数量*/
    private BigDecimal currentSumupInQty;
    /**当前期段累计出库数量*/
    private BigDecimal currentSumupOutQty;
    /**占用数量*/
    private BigDecimal engagedQty;
    /**所属部门*/
    @Dict(dicEntity = Dept.class, dicText = "departName", dicCode = "id")
    private String inHrDeptId;
    /**入库价*/
    private BigDecimal inPrice;
    /**入库登账责任人ID*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    private String inSysUserId;
    /**入库单申请明细中的id*/
    private String inboundApplyItemId;
    /**入库日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date inventoryDate;
    /**库存状态：0 可用，1 报废，2 冻结，3 盘点*/
    @Dict(dicCode = "inventory_status")
    private Integer inventoryStatus;
    /**是否删除*/
    private Integer isDelete;
    /**最后修改日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**最后修改人*/
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    private String updatedBy;
    /** 超期日期*/
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date rejectDate;
    /**版本*/
    private Integer version;
    /**仓库id*/
    @Dict(dicEntity = EquipmentStock.class, dicText = "stockName", dicCode = "id")
    private String stockId;
    /**供应商id*/
    @Dict(dicEntity = EquipmentMerchants.class, dicText = "name", dicCode = "id")
    private String merchantsId;
    /**物料id*/
    @Dict(dicEntity = EquipmentMaterial.class, dicText = "name", dicCode = "id")
    private String materialsId;
    /**货架id*/
    // todo dict
//    @Dict(dicEntity = "tpm_stock_shelf", dicText = "code", dicCode = "id")
    private String shelfId;
    /**库位*/
    @Dict(dicEntity = EquipmentStockLocation.class, dicText = "locationName", dicCode = "id")
    private String stocklocation;
    /**备品*/
    private String materialsName;
    private String materialsCode;
    private String materialsType;
    private String materialsBrand;
    private String materialsSpec;
    private String materialsUnit;
    private BigDecimal materialsEsPrice;
    private Integer realPrice;
    private Integer stockNum;
    private Integer outNumber;
    private Integer outPrice;
}
